home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Report Writers / Crystal Repot 9.0 Full CD version / Setup.exe / Windows / System32 / HTMLRE90.DLL / HTML / 11685 < prev    next >
Encoding:
Text File  |  2002-07-05  |  4.6 KB  |  178 lines

  1. <HTML>
  2. <HEAD>
  3.   <LINK REL="stylesheet" TYPE="text/css" HREF="%1css/default.css">
  4.  
  5. <script language="Javascript">
  6. //LOCALIZATION STRINGS
  7. var L_NOT_A_NUMBER_OR_ZERO = "The value must be a whole number greater than zero.";
  8. var L_UNKNOWN = "Unknown";
  9. var L_DIR_CANNOT_BE_EMPTY = "The destination directory cannot be empty.";
  10. var L_HOST_NAME_EMPTY = "The host name cannot be empty.";
  11. var L_FROM_EMPTY = "The From field cannot be empty.";
  12. var L_TO_EMPTY = "The To field cannot be empty.";
  13. </script>
  14.  
  15. <SCRIPT LANGUAGE="JavaScript" SRC="%1js/FormChek.js"></SCRIPT>
  16.  
  17. <SCRIPT>
  18. function init()
  19. {
  20.     var sel = '%2';
  21.     if(sel == "unknown")
  22.     {
  23.         option = new Option(L_UNKNOWN, sel, false, false); 
  24.         document.forms['destForm'].dest.options[document.forms['destForm'].dest.options.length] = option;
  25.     }
  26.  
  27.     for(var i = 0; i < document.forms['destForm'].dest.options.length; ++i)
  28.     {
  29.         if(document.forms['destForm'].dest.options[i].value == sel)
  30.         {
  31.             document.forms['destForm'].dest.options[i].selected = true;
  32.             break;
  33.         }
  34.     }
  35.  
  36.     // call the dest init function
  37.     onDestInit(); 
  38. }
  39.  
  40. function changeDest(d)
  41. {
  42.     document.location.replace("%3" + "&dest=" + d);
  43. }
  44.  
  45. function submitForm()
  46. {
  47.     var dest = document.forms["destForm"].dest;
  48.     if(dest.options[dest.selectedIndex].value == "unknown")
  49.     {
  50.         // don't submit the form
  51.         return;
  52.     }
  53.  
  54.     if(dest.options[dest.selectedIndex].value == "disk")
  55.     {        
  56.         if (document.forms["destForm"].server_default.value != "true")
  57.         {            
  58.             if(document.forms["destForm"].dir.value == "")
  59.             {
  60.                 alert(L_DIR_CANNOT_BE_EMPTY);
  61.                 document.forms["destForm"].dir.focus();
  62.                 return;
  63.             }
  64.         }
  65.     }
  66.  
  67.     if(dest.options[dest.selectedIndex].value == "ftp")
  68.     {
  69.         if (document.forms["destForm"].server_default.value != "true")
  70.         {
  71.             if(document.forms["destForm"].host.value == "")
  72.             {
  73.                 alert(L_HOST_NAME_EMPTY);
  74.                 document.forms["destForm"].host.focus();
  75.                 return;
  76.             }
  77.         }
  78.  
  79.         var port = document.forms["destForm"].port;
  80.         if(!isPositiveInteger(port.value))
  81.         {
  82.             alert(L_NOT_A_NUMBER_OR_ZERO);
  83.             port.focus();
  84.             port.select();
  85.             return;
  86.         }
  87.     }
  88.  
  89.     if(dest.options[dest.selectedIndex].value == "smtp")
  90.     {
  91.         if (document.forms["destForm"].server_default.value != "true")
  92.         {
  93.             if(document.forms["destForm"].sender.value == "")
  94.             {
  95.                 alert(L_FROM_EMPTY);
  96.                 document.forms["destForm"].sender.focus();
  97.                 return;
  98.             }
  99.             if(document.forms["destForm"].to.value == "")
  100.             {
  101.                 alert(L_TO_EMPTY);
  102.                 document.forms["destForm"].to.focus();
  103.                 return;
  104.             }
  105.         }
  106.     }
  107.  
  108.     document.forms['destForm'].submit();
  109. }
  110.  
  111. function resetForm()
  112. {
  113.     document.location.replace("%4");
  114. }
  115.  
  116. function addProperty()
  117. {
  118.     var prop = document.forms['destForm'].props.options[document.forms['destForm'].props.selectedIndex].value;
  119.     document.forms['destForm'].specname.value = document.forms['destForm'].specname.value + prop;
  120.     document.forms['destForm'].specname.focus();
  121. }
  122.  
  123. function addLink()
  124. {
  125.     var prop = "%SI_VIEWER_URL%";
  126.     document.forms['destForm'].msg.value = document.forms['destForm'].msg.value + "\n" + prop;
  127.     document.forms['destForm'].msg.focus();
  128. }
  129. </SCRIPT>
  130.  
  131. </HEAD>
  132. <BODY LEFTMARGIN="5" RIGHTMARGIN="5" onload='init()'>
  133.  
  134. <DIV ID="tooltip" STYLE="position:absolute;visibility:hidden;z-index:99;"></DIV>
  135. <SCRIPT SRC="%1js/helps.js"></SCRIPT>
  136. <SCRIPT SRC="%1js/tips.js"></SCRIPT>
  137.  
  138. <span class='listSelected'>Set the Destination for the report.</span><br>
  139.  
  140. <p>
  141.  
  142. <center>
  143. <form name='destForm' method=POST action='%5'>
  144. <table width='90%'>
  145. <tr><td class='list'>
  146. </td></tr>
  147. <tr><td class='list'>
  148. Destination:
  149. <select name='dest' class='menuFormElement' onchange='changeDest(this.options[this.selectedIndex].value)';>
  150. <option value='frs' selected>Default
  151. <option value='disk'>Unmanaged Disk
  152. <option value='ftp'>FTP
  153. <option value='smtp'>Email (SMTP)
  154. </select>
  155. </td></tr>
  156. </table>
  157.  
  158. <p>
  159.  
  160. %6
  161.  
  162. </form>
  163. </center>
  164.  
  165.   <table align="right" border=0 cellpadding=0>
  166.   <tr valign=center>
  167.   <td class="clsButton" align=middle nowrap>
  168.   <div class="clsButton"><a href="javascript: submitForm()" onMouseOver="St(7);window.status='';return true;" onMouseOut="Ht()">Update</a></div>
  169.   </td>
  170.   <td class="clsButton" align=middle nowrap>
  171.   <div class="clsButton"><a href="javascript: resetForm()" onMouseOver="St(8);window.status='';return true;" onMouseOut="Ht()">Reset</a></div>
  172.   </td>
  173.   </tr>  
  174.   </table>
  175.  
  176. </BODY>
  177. </HTML>
  178.